package cn.tedu.thread;

/**
 * @author :Colin
 * @version 创建时间: 2021/6/22 17:11
 */
public class TestThread2 {
    public static void main(String[] args) {
        //创建线程对象进行测试
        MyRunnable target = new MyRunnable();

        Thread t1 =new Thread(target,"Jack");
        Thread t2 =new Thread(target,"Rose");
        Thread t3 =new Thread(target,"vosi");
        t1.start();
        t2.start();
        t3.start();
    }
}
class MyRunnable implements Runnable{

    @Override
    public void run() {
        for(int i = 1;i < 11;i++){
            System.out.println(i+Thread.currentThread().getName());
        }
    }
}